<? session_start();
require "../../../global.php";//$dirname."/".
require RootDir."/"."inc/config.php";
require RootDir."/".$SystemConest[1]."/system/config.php";
require RootDir."/"."inc/Uifunction.php";
require RootDir."/".$SystemConest[1]."/UIFunction/adminClass.php";
require RootDir."/".$SystemConest[1]."/system/menusys/function.php";

if($_SESSION["Login"][1]<>$SystemConest[2])
{
	die("你不是超级管理员,没有权限设置");
}
$mydb=new YYBDB();
$id=$_REQUEST["Id"];

$rsc=$mydb->db_query("select * from ".$SystemConest[7].$SystemTablename[2]." where ".$SystemTablename[2]."0=".$id);
$sql="";
$numRsFields=$mydb->db_num_fields($rsc);

$myFields=array();
$rs=$mydb->db_fetch_array($rsc);
for($i=1;$i<$numRsFields;$i++)
{
	$myFields[$i]=$rs[$i];
}

$mydb->TableName=$SystemTablename[2];
$mydb->ArrFields=$myFields;
$mydb->Add();
if($mydb->Returns>0)
{
	MessgBox("/".$SystemConest[1]."/Iamges/Right.jpg","操作成功！","/".$SystemConest[1]."/system/menusys/Index.php?MenuId=$MenuId&PMID=". $_REQUEST["PMID"]."&CurrPage=" .$_REQUEST["CurrPage"]."&OwerID=".$_REQUEST["OwerID"]) ;
}
else
{
	MessgBox("/".$SystemConest[1]."/Iamges/Error.jpg","操作失败！","/".$SystemConest[1]."/system/menusys/Index.php?MenuId=$MenuId&PMID=". $_REQUEST["PMID"]."&CurrPage=" .$_REQUEST["CurrPage"]."&OwerID=".$_REQUEST["OwerID"]) ;
}

?>
<script language="javascript">
<!--
  window.parent.frames.item("leftFrame").location.reload(); 
-->
</script>